/*
*  Copyright 2020-2021 Li Fei
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package com.pengshun.modules.api.coal.domain;

import lombok.Data;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.sql.Date;
import java.sql.Timestamp;
import java.math.BigDecimal;
import java.io.Serializable;

/**
* @description /
* @author lifei
* @date 2020-11-09
**/
@Entity
@Data
@Table(name="ps_coal_record")
public class CoalRecord implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    @ApiModelProperty(value = "主键")
    private Long id;

    @Column(name = "coal_name",nullable = false)
    @NotBlank
    @ApiModelProperty(value = "煤炭名称")
    private String coalName;

    @Column(name = "coal_id",nullable = false)
    @NotNull
    @ApiModelProperty(value = "煤炭ID")
    private Long coalId;

    @Column(name = "coal_mine_id",nullable = false)
    @NotNull
    @ApiModelProperty(value = "煤矿id")
    private Long coalMineId;

    @Column(name = "coal_mine_name",nullable = false)
    @NotBlank
    @ApiModelProperty(value = "煤矿名称")
    private String coalMineName;

    @Column(name = "coal_price",nullable = false)
    @NotNull
    @ApiModelProperty(value = "煤矿价格")
    private BigDecimal coalPrice;

    @Column(name = "price_unit",nullable = false)
    @NotBlank
    @ApiModelProperty(value = "价格单位")
    private String priceUnit;

    @Column(name = "remark")
    @ApiModelProperty(value = "备注")
    private String remark;

    @Column(name = "status")
    @ApiModelProperty(value = "状态 0-正常；1-禁用；2-删除")
    private String status;

    @Column(name = "create_by")
    @ApiModelProperty(value = "创建人")
    private String createBy;

    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @Column(name = "update_by")
    @ApiModelProperty(value = "更新人")
    private String updateBy;

    private Integer isnew;

    @Column(name = "update_time")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

}